﻿using System;
using System.Collections.Generic;
using DC2010.Objects.Base;

namespace DC2010.Objects.Data
{
	[Serializable]
    public class DoorData : BaseData
    {
        public bool IsBroken { get; set; }  
        public bool IsPicklockable { get; set; }	

        /// <summary>
        /// IDs of already consumed keys
        /// </summary>				
        public List<string> ConsumedKeys { get; set; }	

        public DoorGfx Gfx
        {
            get
            {
                if (!string.IsNullOrEmpty(GfxId))
                {
                    return Root.I.DoorSystem.GetGfx(GfxId);
                }

                return null;
            }
        }			
	
        private DoorLogic _l;
        public DoorLogic L
        {
            get
            {
                if (_l == null)
                    _l = new DoorLogic(this);

                return _l;
            }
        }
    }
}
